<!--
 * @Author: your name
 * @Date: 2020-09-12 15:20:05
 * @LastEditTime: 2020-09-12 16:29:02
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \PipeOneMap_WebClient\src\app\shared\components\grid-table\grid-table.component.html
-->
<div class="table">
  <div class="theader">
    <div class="th one">序号</div>
      <ng-container *ngFor="let header of data.theader">
        <div *ngIf="header.name !== '长度' && header.name !== '数量'" class="th">{{header.name}}</div>
        <div *ngIf="header.name === '数量'" class="th">{{header.name+'(个)'}}</div>
        <div *ngIf="header.name === '长度'" class="th">{{header.name +'(米)'}}</div>
      </ng-container>
  </div>
  <div class="tbody">
    <div *ngFor="let item of data.tdata, let i = index" class="item">
      <div class="td one">{{ i+1 }}</div>
      <ng-container *ngFor="let header of data.theader">
        <div class="td">{{item[header.attr]}}</div>
        <!-- <div class="td" *ngIf="header.name === '长度'">{{item[header.attr] |   number:'0.2-2'}}</div> -->
      </ng-container>
    </div>
  </div>
</div>
